
<HTML>
<BODY>
	<%@page import = "java.util.List,com.dao.CustomersDAO,com.dao.CustomerBaseDAO,com.dao.BaseDAO,com.crm.customer.model.Customer,java.util.LinkedList,com.service.CustomerService"%>
	<jsp:useBean id="customers" class = "java.util.LinkedList" type = "java.util.List" scope="request"></jsp:useBean>

	<a href="CustomerAddController.do">Add a New Customer</a>
	
	<TABLE border="1">
		<thead>
			<tr>
				<th>Customer ID</th>
				<th>Customer Fist Name</th>
				<th>Customer Last Name</th>
				<th>Sex</th>
				<th>Age</th>
				<th>Height</th>
				<th>Weight</th>
				<th>Joined Package</th>
				<th>Taken Care by Staff</th>
			</tr>		
		</thead>

		<%
			for (int i = 0; i < customers.size(); i++) {
				Customer c = (Customer) customers.get(i);
		%>
		<tr>
			<td><%=c.getCustomer_id()%></td>
			<td><%=c.getFirstName()%></td>
			<td><%=c.getLastName()%></td>
			<td><%=c.getSex()%></td>
			<td><%=c.getAge()%></td>
			<td><%=c.getHeight()%></td>
			<td><%=c.getWeight()%></td>
			<td><%=c.getPackage_id()%></td>
			<td><%=c.getEmployee_id()%></td>
			<td><a href="CustomerEditController.do?CUSTOMER_ID=<%=c.getCustomer_id() %>">Update</a></td>
			<td><a href="CustomerDeleteController.do?CUSTOMER_ID=<%=c.getCustomer_id() %>">Delete</a></td>
		<tr>
			<%
				}
			%>
		
	</TABLE>

</BODY>
</HTML>